import { ElLoading } from 'element-plus';
let loadingInstance:any = null;
let txt = '加载中...';
const showLoading = (txt:string = "加载中...") => loadingInstance = ElLoading.service({ fullscreen: true, background: 'rgba(0,0,0, 0.4)', text: txt });
const closeLoading = () => {
    if (!loadingInstance) return
    loadingInstance.close();
}
export default {
    showLoading,
    closeLoading
};